package 周六;

import java.io.*;

public class CopyDemo3Buffered {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("yy.jpg");
        BufferedInputStream bis=new BufferedInputStream(fis);
        FileOutputStream fos=new FileOutputStream("22.jpg");
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        int a;
        while ((a=bis.read())!=-1){
            bos.write(a);
        }
        bos.close();
        bis.close();
    }
}
